<template>
	<view>
		<u-no-network
			@disconnected="disconnected"
			@connected="connected"
			@retry="retry"
		></u-no-network>
	</view>
</template>

<script setup>
import {onNavigationBarButtonTap, onLoad} from "@dcloudio/uni-app"
function disconnected(){
	console.log('disconnected');
	var pages = getCurrentPages();
	var page = pages[pages.length - 1];
	var currentWebview = page.$getAppWebview();
	currentWebview.setTitleNViewButtonStyle(0,{
		color: "#FF0000"
	})
}
function connected(){
	console.log('connected');
	var pages = getCurrentPages();
	var page = pages[pages.length - 1];
	var currentWebview = page.$getAppWebview();
	currentWebview.setTitleNViewButtonStyle(0,{
		color: "#42b883"
	})
}
function retry(){
	console.log('retry');
	var pages = getCurrentPages();
	var page = pages[pages.length - 1];
	var currentWebview = page.$getAppWebview();
	currentWebview.setTitleNViewButtonStyle(0,{
		color: "#f9ae3d"
	})
}

</script>

<style lang="scss" scoped>

</style>